package semantic;

import java.util.HashMap;
import java.util.Map;

public class SymbolTable {
    private Map<String, Object> symbols;

    public SymbolTable() {
        this.symbols = new HashMap<>();
    }

    public void define(String name, Object value) {
        symbols.put(name, value);
    }

    public Object lookup(String name) {
        return symbols.get(name);
    }

    public boolean exists(String name) {
        return symbols.containsKey(name);
    }
}